package com.koron.ticket.work.logicticket.hightask.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.koron.ticket.work.securityarrangement.bean.SecurityArrangement;
import com.koron.ticket.work.workflow.bean.WorkFlow;
import com.koron.ticket.work.worklocation.bean.WorkLocationBean;
import com.koron.ticket.work.workmember.bean.WorkMember;
import com.koron.ticket.work.workteam.bean.WorkTeam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * 高出作业票
 */
@Data
public class HighTaskDto {

    @ApiModelProperty(value = "ID")
    private String id;

    @ApiModelProperty(value = "工作票票号")
    private String code;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "工作票类型")
    private String type;

    @ApiModelProperty(value = "工作票状态，来源数据字典，两票管理-ticket_work_status")
    private Integer status;

    @ApiModelProperty(value = "开票人所在单位id、申请单位id")
    private String unit;

    @ApiModelProperty(value = "开票人所在单位name、申请单位名称")
    private String unitName;

    @ApiModelProperty(value="申请人acc")
    private String director;

    @ApiModelProperty(value="申请人名称")
    private String directorName;

    @ApiModelProperty(value = "申请人acc")
    private String proposer;

    @ApiModelProperty(value = "申请人名称")
    private String proposerName;

    @ApiModelProperty(value="作业申请时间")
    private Date appTime;

    @ApiModelProperty(value="作业实施开始时间")
    private Date estimatedStartTime;

    @ApiModelProperty(value="作业实施结束时间")
    private Date estimatedEndTime;

    // 9. 工作地点
    @ApiModelProperty(value = "工作地点")
    private List<WorkLocationBean> workLocationList;

    @ApiModelProperty(value="作业内容")
    private String content;

    @ApiModelProperty(value="作业高度")
    private String heightWork;

    @ApiModelProperty(value="作业类别 1一类、2二类、3三类")
    private String jobCategory;

    @ApiModelProperty(value = "工作班组")
    private List<WorkTeam> workTeamList;

    @ApiModelProperty(value="监护人acc")
    private String guardian;

    @ApiModelProperty(value="监护人名称")
    private String guardianName;

    @ApiModelProperty(value = "工作班组成员")
    private List<WorkMember> workMemberList;

    @ApiModelProperty(value="涉及其他特殊作业")
    private String otherSpecialWork;

    @ApiModelProperty(value="涉及的其他特殊作业安全作业证编号、电工证号")
    private String otherSpecialNum;

    @ApiModelProperty(value="风险辨识结果")
    private String riskResults;

    @ApiModelProperty(value = "安全措施列表")
    private List<SecurityArrangement> securityArrangementList;

    @ApiModelProperty(value="安全交底人acc")
    private String securityAcc;

    @ApiModelProperty(value="安全交底人名称")
    private String securityName;

    @ApiModelProperty(value="接受交底人acc")
    private String acceptAcc;

    @ApiModelProperty(value="接受交底人名称")
    private String acceptName;

    @ApiModelProperty(value = "创建人ID", hidden = true)
    private String createUserId;

    @ApiModelProperty(value = "创建人姓名", hidden = true)
    private String createUserName;

    @ApiModelProperty(value = "创建人ID", hidden = true)
    private String createDept;

    @ApiModelProperty(value = "创建人ID", hidden = true)
    private String createDeptName;

    @ApiModelProperty(value = "最后修改时间", hidden = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty(value = "签名信息")
    private List<WorkFlow> workFlowList;

    public String getProposer() {
        return director;
    }

    public String getProposerName() {
        return director;
    }
}
